-
-
Notifications
You must be signed in to change notification settings - Fork 362
fix(Modal): support backdrop on multiple dialog mode #6807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideEnable proper backdrop layering when multiple modals/dialogs are open by introducing a modifier class with custom z-index handling in styles and rendering an extra backdrop element before the last dialog instance. Class diagram for updated modal and dialog structureclassDiagram
class Modal {
}
class Dialog {
+DialogParameters
+RenderDialog(index, key)
}
Modal <|-- Dialog
class "modal-multiple" {
+--bb-backdrop-zindex
}
Dialog --> "modal-multiple" : uses
class "modal-backdrop" {
}
"modal-multiple" --> "modal-backdrop" : contains
"modal-backdrop" --> Modal : rendered before last dialog
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes backdrop display issues in multiple dialog mode by restructuring the CSS and adding proper backdrop elements. The fix ensures that modal backdrops are correctly managed when multiple dialogs are present.
- Refactored CSS to use CSS custom properties for z-index management in multiple dialog scenarios
- Added conditional backdrop element rendering for multiple dialogs
- Removed pseudo-element approach in favor of proper backdrop HTML elements
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Modal.razor.scss | Restructures CSS for multiple modal backdrops using CSS variables and proper z-index management |
| Dialog.razor | Adds conditional backdrop HTML element rendering for multiple dialog scenarios |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `src/BootstrapBlazor/Components/Modal/Modal.razor.scss:102-99` </location>
<code_context>
+ z-index: var(--bb-backdrop-zindex);
+}
+
+.modal-multiple .modal-backdrop + .modal-dialog {
+ z-index: var(--bb-backdrop-zindex);
+}
+
</code_context>
<issue_to_address>
**suggestion (bug_risk):** Assigning the same z-index to both backdrop and dialog may cause stacking issues.
Increase the dialog's z-index so it reliably appears above the backdrop.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6807 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 739 739
Lines 31748 31751 +3
Branches 4464 4465 +1
=========================================
+ Hits 31748 31751 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #6730
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add support for backdrops in multiple-dialog mode by injecting a backdrop element for secondary dialogs and adjusting CSS stacking via a custom z-index property.
Bug Fixes:
Enhancements: